<?php
/**
 * View do formulário de servico
 * @filesource  06/04/2011
 * @author      Estrada Virtual <http://estradavirtual.com.br>
 * @copyright   Copyright <2011> Estrada Virtual
 * @package     <<application>>
 * @subpackage  <<application>>.application.views
 * @version     $Id$
 */
 ?>
<div class="ev-formulario">
    <h1><?php echo $this->translate('id_servico'); ?></h1>
    <form action="<?php echo $this->baseUrl() ?>/servico/servico/gravar" method="post" name="formulario" id="formulario">
        <input type="hidden" name="id_servico" id="id_servico" value="<?php echo $this->row->id_servico; ?>" />

        <label for="fk_tipo_servico"><?php echo $this->translate('fk_tipo_servico'); ?>&nbsp;<span class="campoObrigatorio">*</span>: </label>
        <?php echo $this->formSelect( "fk_tipo_servico", $this->row->fk_tipo_servico, array( "id" => "fk_tipo_servico", "title" => $this->translate("fk_tipo_servico"), "class" => "text ui-widget-content ui-corner-all required"), $this->aReferencias["fk_tipo_servico"]); ?><br />

        <label for="fk_cliente"><?php echo $this->translate('fk_cliente'); ?>&nbsp;<span class="campoObrigatorio">*</span>: </label>
        <?php echo $this->formSelect( "fk_cliente", $this->row->fk_cliente, array( "id" => "fk_cliente", "title" => $this->translate("fk_cliente"), "class" => "text ui-widget-content ui-corner-all required"), $this->aReferencias["fk_cliente"]); ?><br />

        <div class="campo">
            <label for="st_nome"><?php echo $this->translate('st_nome'); ?>&nbsp;<span class="campoObrigatorio">*</span>: </label>
            <input class="text ui-widget-content ui-corner-all required" type="text" name="st_nome" id="st_nome" title="<?php echo $this->translate("st_nome"); ?>" value="<?php echo $this->row->st_nome; ?>" />
        </div>

        <div class="campo">
            <label for="dt_inicio"><?php echo $this->translate('dt_inicio'); ?>&nbsp;<span class="campoObrigatorio">*</span>: </label>
            <input class="text ui-widget-content ui-corner-all required data" type="text" name="dt_inicio" id="dt_inicio" title="<?php echo $this->translate("dt_inicio"); ?>" value="<?php echo $this->dateFormat($this->row->dt_inicio); ?>"/><br />
        </div>
        <div class="campo">
            <label for="dt_fim"><?php echo $this->translate('dt_fim'); ?>&nbsp;<span class="campoObrigatorio">*</span>: </label>
            <input class="text ui-widget-content ui-corner-all required data" type="text" name="dt_fim" id="dt_fim" title="<?php echo $this->translate("dt_fim"); ?>" value="<?php echo $this->dateFormat($this->row->dt_fim); ?>"/><br />
        </div>
        <div class="campo">
            <label for="dt_cadastro"><?php echo $this->translate('dt_cadastro'); ?>&nbsp;<span class="campoObrigatorio">*</span>: </label>
            <?php echo $this->row->dt_cadastro; ?><br />
        </div>

        <label for="vl_valor"><?php echo $this->translate('vl_valor'); ?>&nbsp;<span class="campoObrigatorio">*</span>: </label>
        <input class="text ui-widget-content ui-corner-all  required " type="text" name="vl_valor" id="vl_valor" value="<?php echo $this->row->vl_valor; ?>" title="<?php echo $this->translate("vl_valor"); ?>"   /><br />

        <div id="botoesAcao">
            <input type="submit" class="btSalvar" name="enviar" id="enviar" value="Enviar" />
            <input type="button" class="btExcluir" name="cancelar" id="cancelar" value="Cancelar" />
        </div>
    </form>
</div>

<script type="text/javascript">
    $().ready(function() {
        $("form").validate();
        $('#cancelar').click(function(){
            window.location = "<?php echo $this->baseUrl() ?>/servico/servico";
        });
    });
</script>